﻿@model List<StripeDemo.Models.Cards>

@{
    ViewBag.Title = "List all payment method";
}

<h2>List all payment method available for userid @ViewBag.cusID</h2>

<table class="table">
    <tr>
        <th>Default</th>
        <th>Card</th>
        <th>Number</th>
        <th>Expires</th>
        <th>CVC</th>
        <th>BillingAddress</th>
        <th></th>
    </tr>
    @foreach (var item in Model)
    {
        <tr>
            <td>@item.isDefault</td>
            <td>@item.Card</td>
            <td>@item.CardNumber</td>
            <td>@item.ExpiresMonth / @item.ExpiresYear</td>
            <td>@item.CVC</td>
            <td>@item.BillingAddress</td>
            <td>
                @Html.ActionLink("Edit", "Detail", new { id = item.CardId }) |
                @Html.ActionLink("Mark as default", "Default", new { id = item.CardId })
            </td>
        </tr>
    }
</table>

@Html.ActionLink("Create Card", "CreateCard")

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
